package com.cyq.day03;

import java.util.Scanner;

public class Demo02 {
    public static void main(String[] args) {
        //输入一个分数
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个分数");
        int grade = sc.nextInt();
//        if (grade>100||grade<0){
//            System.out.println("请输入正确的分数");
//            return;
//        }
//        if (grade<60){
//            System.out.println("此成绩不及格");
//        }else if(grade<70){
//            System.out.println("此成绩及格");
//        }else if(grade<80){
//            System.out.println("此成绩中等");
//        }else if(grade<90){
//            System.out.println("此成绩良好");
//        }else{
//            System.out.println("此成绩优秀");
//        }
        int switchGrade=grade/10;
        if (switchGrade>10||switchGrade<0){
            System.out.println("请输入正确的分数");
        }else if(switchGrade==10){
            System.out.println("此成绩满分");
        }else {
            switch (switchGrade) {
                case 9:
                    System.out.println("此成绩优秀");
                    break;
                case 8:
                    System.out.println("此成绩良好");
                    break;
                case 7:
                    System.out.println("此成绩中等");
                    break;
                case 6:
                    System.out.println("此成绩及格");
                default:
                    System.out.println("此成绩不及格");
            }
        }
    }
}
